Optimal. Leaf size=41 \[ \frac {\tanh ^{-1}(\sin (x))}{a}-\frac {\sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} \sin (x)}{\sqrt {a+b}}\right )}{a \sqrt {a+b}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {3186, 391, 206, 208} \[ \frac {\tanh ^{-1}(\sin (x))}{a}-\frac {\sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} \sin (x)}{\sqrt {a+b}}\right )}{a \sqrt {a+b}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 208
Rule 391
Rule 3186
Rubi steps
\begin {align*} \int \frac {\sec (x)}{a+b \cos ^2(x)} \, dx &=\operatorname {Subst}\left (\int \frac {1}{\left (1-x^2\right ) \left (a+b-b x^2\right )} \, dx,x,\sin (x)\right )\\ &=\frac {\operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin (x)\right )}{a}-\frac {b \operatorname {Subst}\left (\int \frac {1}{a+b-b x^2} \, dx,x,\sin (x)\right )}{a}\\ &=\frac {\tanh ^{-1}(\sin (x))}{a}-\frac {\sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} \sin (x)}{\sqrt {a+b}}\right )}{a \sqrt {a+b}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 38, normalized size = 0.93 \[ \frac {\tanh ^{-1}(\sin (x))-\frac {\sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} \sin (x)}{\sqrt {a+b}}\right )}{\sqrt {a+b}}}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.60, size = 119, normalized size = 2.90 \[ \left [\frac {\sqrt {\frac {b}{a + b}} \log \left (-\frac {b \cos \relax (x)^{2} + 2 \, {\left (a + b\right )} \sqrt {\frac {b}{a + b}} \sin \relax (x) - a - 2 \, b}{b \cos \relax (x)^{2} + a}\right ) + \log \left (\sin \relax (x) + 1\right ) - \log \left (-\sin \relax (x) + 1\right )}{2 \, a}, \frac {2 \, \sqrt {-\frac {b}{a + b}} \arctan \left (\sqrt {-\frac {b}{a + b}} \sin \relax (x)\right ) + \log \left (\sin \relax (x) + 1\right ) - \log \left (-\sin \relax (x) + 1\right )}{2 \, a}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.19, size = 57, normalized size = 1.39 \[ \frac {b \arctan \left (\frac {b \sin \relax (x)}{\sqrt {-a b - b^{2}}}\right )}{\sqrt {-a b - b^{2}} a} + \frac {\log \left (\sin \relax (x) + 1\right )}{2 \, a} - \frac {\log \left (-\sin \relax (x) + 1\right )}{2 \, a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.10, size = 47, normalized size = 1.15 \[ -\frac {b \arctanh \left (\frac {\sin \relax (x ) b}{\sqrt {\left (a +b \right ) b}}\right )}{a \sqrt {\left (a +b \right ) b}}-\frac {\ln \left (\sin \relax (x )-1\right )}{2 a}+\frac {\ln \left (\sin \relax (x )+1\right )}{2 a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.92, size = 64, normalized size = 1.56 \[ \frac {b \log \left (\frac {b \sin \relax (x) - \sqrt {{\left (a + b\right )} b}}{b \sin \relax (x) + \sqrt {{\left (a + b\right )} b}}\right )}{2 \, \sqrt {{\left (a + b\right )} b} a} + \frac {\log \left (\sin \relax (x) + 1\right )}{2 \, a} - \frac {\log \left (\sin \relax (x) - 1\right )}{2 \, a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.50, size = 414, normalized size = 10.10 \[ \frac {\mathrm {atanh}\left (\sin \relax (x)\right )}{a}+\frac {\mathrm {atan}\left (\frac {\frac {\left (2\,b^3\,\sin \relax (x)+\frac {\left (2\,a^2\,b^2-\frac {\sin \relax (x)\,\left (8\,a^3\,b^2+16\,a^2\,b^3\right )\,\sqrt {b\,\left (a+b\right )}}{4\,\left (a^2+b\,a\right )}\right )\,\sqrt {b\,\left (a+b\right )}}{2\,\left (a^2+b\,a\right )}\right )\,\sqrt {b\,\left (a+b\right )}\,1{}\mathrm {i}}{a^2+b\,a}+\frac {\left (2\,b^3\,\sin \relax (x)-\frac {\left (2\,a^2\,b^2+\frac {\sin \relax (x)\,\left (8\,a^3\,b^2+16\,a^2\,b^3\right )\,\sqrt {b\,\left (a+b\right )}}{4\,\left (a^2+b\,a\right )}\right )\,\sqrt {b\,\left (a+b\right )}}{2\,\left (a^2+b\,a\right )}\right )\,\sqrt {b\,\left (a+b\right )}\,1{}\mathrm {i}}{a^2+b\,a}}{\frac {\left (2\,b^3\,\sin \relax (x)+\frac {\left (2\,a^2\,b^2-\frac {\sin \relax (x)\,\left (8\,a^3\,b^2+16\,a^2\,b^3\right )\,\sqrt {b\,\left (a+b\right )}}{4\,\left (a^2+b\,a\right )}\right )\,\sqrt {b\,\left (a+b\right )}}{2\,\left (a^2+b\,a\right )}\right )\,\sqrt {b\,\left (a+b\right )}}{a^2+b\,a}-\frac {\left (2\,b^3\,\sin \relax (x)-\frac {\left (2\,a^2\,b^2+\frac {\sin \relax (x)\,\left (8\,a^3\,b^2+16\,a^2\,b^3\right )\,\sqrt {b\,\left (a+b\right )}}{4\,\left (a^2+b\,a\right )}\right )\,\sqrt {b\,\left (a+b\right )}}{2\,\left (a^2+b\,a\right )}\right )\,\sqrt {b\,\left (a+b\right )}}{a^2+b\,a}}\right )\,\sqrt {b\,\left (a+b\right )}\,1{}\mathrm {i}}{a^2+b\,a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec {\relax (x )}}{a + b \cos ^{2}{\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________